package com.fqgj.xjd.user.dao;
import com.fqgj.common.api.Page;
import com.fqgj.common.base.BaseMapper;
import com.fqgj.xjd.user.entity.UserBehaviorRegisterEntity;

import java.util.List;

/**
* User: zhangxingyun
* Date: 2017-07-20
* Time: 18:38:53.061
*/

public interface UserBehaviorRegisterDao  extends BaseMapper<UserBehaviorRegisterEntity> {

    UserBehaviorRegisterEntity selectUserBehaviorRegisterByUserCodeAndAppCode(String userCode);


    List<UserBehaviorRegisterEntity> selectUserRegisterByClientId(String clientId);


    List<UserBehaviorRegisterEntity> selectUserRegisterByPage(Page page);

    /**
     * 按注册来源统计注册来源
     * @param registerFrom
     * @param appCode
     * @param biz
     * @return
     */
    Integer countTotalByRegisterFrom(String registerFrom, String appCode, Integer biz);

    /**
     * 按注册来源查询用户信息
     * @param registerFrom
     * @param appCode
     * @param biz
     * @param start
     * @param pageSize
     * @return
     */
    List<String> pagedQueryUserByRegisterFrom(String registerFrom, String appCode, Integer biz,
                                      Integer start, Integer pageSize);

    /**
     * 获取最近几小时内的注册渠道号
     * @param hour
     * @return
     */
    List<String> selectLatestRegisterChannelByHour(int hour);
}